home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / installer / Install-FLOPPY < prev    next >
Encoding:
Text File  |  1994-08-18  |  10.4 KB  |  380 lines

  1. ;
  2. ; Script to install DICE.
  3. ;
  4. ; $Id: Install-FLOPPY,v 30.0 1994/06/10 17:55:03 dice Exp $
  5. ;
  6. (set Dice_Version "V3.0")
  7. (set dice_name "Dice_3.0")
  8.  
  9. (set dice_dest (cat dice_name ":"))
  10. (set arch_dest (cat "arch:" dice_name))
  11.  
  12.  
  13. ; Set state variables
  14. ;
  15. (delopts "force")               ;Unprotect destination files automatically
  16. (user 2)                        ;Ask them all the questions.  Sorry.
  17.  
  18. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  21. ; Dice Version Number used in the naming convention of the distribution
  22. ; diskettes. ie. Disk1_DiceVersion,  Disk2_DiceVersion etc.
  23. ;
  24.  
  25. ; Set up logical disk Disks
  26. ;
  27. (set Disk1: (cat "Disk1_" Dice_Version ":"))
  28. (set Disk1  (cat "Disk1_" Dice_Version))
  29. (set Disk2: (cat "Disk2_" Dice_Version ":"))
  30. (set Disk2  (cat "Disk2_" Dice_Version))
  31. (set Disk3: (cat "Disk3_" Dice_Version ":"))
  32. (set Disk3  (cat "Disk3_" Dice_Version))
  33. (set Disk4: (cat "Disk4_" Dice_Version ":"))
  34. (set Disk4  (cat "Disk4_" Dice_Version))
  35. (set Disk5: (cat "Disk5_" Dice_Version ":"))
  36. (set Disk5  (cat "Disk5_" Dice_Version))
  37.  
  38.  
  39. ; Set up a error cleanup routine
  40. ;
  41. (onerror)
  42. (complete 0)
  43.  
  44. (delopts "force")               ;Unprotect destination files automatically
  45. (user 2)                        ;Ask them all the questions.  Sorry.
  46.  
  47. (set df0 (if (getassign "DF0" "d") ("DF0:") ("Drive not available")))
  48. (set df1 (if (getassign "DF1" "d") ("DF1:") ("Drive not available")))
  49. (set df2 (if (getassign "DF2" "d") ("DF2:") ("Drive not available")))
  50. (set df3 (if (getassign "DF3" "d") ("DF3:") ("Drive not available")))
  51. (set drive "!#@")
  52. (until (getassign drive "d")
  53.     (SET drive
  54.     (cat "DF"
  55.         (askchoice
  56.         (prompt "Which floppy should I install to?")
  57.         (help   "DICE Needs to format a floppy to hold the installed"
  58.             "version.  You will be prompted to insert a floppy in"
  59.             "this drive as a part of the installation process"
  60.         )
  61.         (choices (df0) (df1) (df2) (df3))
  62.         (default 0)
  63.         )
  64.     )
  65.     )
  66. )
  67.  
  68. (set drivename (cat drive ":"))
  69. (if (not
  70.     (askbool
  71.         (prompt "Please insert a floppy into " drivename
  72.             " for formatting to receive the DICE installation\n"
  73.             "Note: All information on this diskette will be lost"
  74.             "Select Proceed to continue, Cancel to abort"
  75.         )
  76.         (help   "You need to put a disk into drive " drivename
  77.             " in order for DICE to be able to format it and then"
  78.             "put the DICE programs on it"
  79.         )
  80.         (choices "Proceed" "Cancel")
  81.     )
  82.     )
  83.     (abort)
  84. )
  85.  
  86. (working "Formatting floppy in drive " drivename)
  87. (textfile
  88.     (dest "ram:nl_file")
  89.     (append "")
  90.     (safe)
  91. )
  92.  
  93. (if
  94.    (run "SYS:System/Format <ram:nl_file >con:1/1/500/50/Formatting_Floppy drive "drivename " name " dice_name " NOICONS")
  95.    (
  96.       (delete "ram:nl_file" (safe))
  97.       (abort)
  98.    )
  99. )
  100.  
  101. (delete "ram:nl_file" (safe))
  102.  
  103. ;***********************************************************************
  104. ;                   Install Disk 1
  105. ;***********************************************************************
  106. (debug "Install Disk1:")
  107. (complete 5)
  108.  
  109. (askdisk
  110.    (prompt "Please insert the disk labeled " Disk1 ".\n"
  111.        "(disk insertion is automatically detected)" )
  112.    (help   "The DICE program and other tools will be copied "
  113.        "from the Disk " Disk1 " into your system.")
  114.    (dest Disk1)
  115. )
  116.  
  117. (debug (cat "RUN >NIL: <NIL: " Disk1: "l/fsovl-handler >NIL: <NIL:"))
  118. (run (cat "RUN >NIL: <NIL: " Disk1: "l/fsovl-handler >NIL: <NIL:"))
  119.  
  120. ;Copy lhex to ram: and set variable to point to lhex utility
  121. ;
  122. (debug "About to copy lhex")
  123. (run "delete ram:lhex force" (safe))
  124.  
  125.     (copyfiles
  126.     (source (cat Disk1: "bin/"))
  127.     (dest "ram:")
  128.     (choices  "lhex")
  129.     (safe)
  130.     )
  131.  
  132. (set lhopt "ram:lhex >CON:0/0/640/40/Unpacker/INACTIVE -fw=%s xv %s")
  133. (set lhext "ram:lhex >CON:0/0/640/40/Unpacker/INACTIVE <ram:lhex.list -fw=%s xv %s")
  134. (complete 8)
  135.  
  136.  
  137. ;***********************************************************************
  138. ; Begin the joys of installation. Setup Dice drawer and icon if not there.
  139. ; At this point we have a valid destination, so we tell installer where
  140. ; the application will end up so the exit page will be correct -- also,
  141. ; the installation log file (if any) will be copied to the destination.
  142. ;***********************************************************************
  143. (set @default-dest dice_dest)
  144.     (
  145.     (makedir (tackon dice_dest "Bin"     ) (infos))
  146.     (makedir (tackon dice_dest "Config"  ) (infos))
  147.     (makedir (tackon dice_dest "User"    ) (infos))
  148.     (makedir (tackon dice_dest "dtmp"))
  149.     (makedir (tackon dice_dest "s"))
  150.     (makedir (tackon dice_dest "Rexx"))
  151.     (makedir (tackon dice_dest "Include"))
  152.     (makedir (tackon dice_dest "Dlib"))
  153.     )
  154.  
  155.     (copyfiles
  156.         (source Disk1:)
  157.         (dest dice_dest)
  158.         (choices "l")
  159.         (infos)
  160.     )
  161.     (complete 9)
  162.  
  163.     (copyfiles
  164.         (source Disk1:)
  165.         (dest arch_dest)
  166.         (choices "bin")
  167.         (infos)
  168.     )
  169.     (complete 15)
  170.  
  171.     (working "Installing Commodore 1.3 Include Files")
  172.     (run (lhopt (tackon arch_dest "Include/") (cat Disk1: "include_13.lha")))
  173.     (complete 20)
  174.  
  175.     (working "Installing extended tools")
  176.     (textfile
  177.         (dest "ram:lhex.list")
  178.         (append "makeproto\nuprev\nwbrun\nVMake\nvopts\n")
  179.         (safe)
  180.     )
  181.     (run
  182.         (lhext (tackon arch_dest "Bin/") (cat Disk1: "extended_tools.lha"))
  183.     )
  184.     (delete "ram:lhex.list" (safe))
  185.         (textfile
  186.         (dest "ram:lhex.list")
  187.         (append "VMake.info\nVopts.info\n")
  188.         (safe)
  189.     )
  190.     (run
  191.         (lhext (tackon dice_dest "Bin/") (cat Disk1: "extended_tools.lha"))
  192.     )
  193.     (delete "ram:lhex.list" (safe))
  194.  
  195.     (complete 23)
  196.  
  197.  
  198.  
  199.    ;***********************************************************************
  200.    ;***********************************************************************
  201.    ;                  Install Disk 2
  202.    ;***********************************************************************
  203. (debug "Install Disk2:")
  204. (complete 22)
  205.  
  206. (askdisk
  207.    (prompt "Please insert the disk labeled " Disk2 ".\n"
  208.        "(disk insertion is automatically detected)" )
  209.    (help   "Some DICE Libraries, Source code, Documentation and Includes"
  210.        "will be copied from the Disk "  Disk2 " into your system.")
  211.    (dest Disk2)
  212. )
  213.  
  214.    (
  215.     (
  216.         (working "Installing DICE Link Libraries")
  217.         (textfile
  218.         (dest "ram:lhex.list")
  219.         (append "DLib/c.o\nDLib/c_pi.o\nDLib/c_pr.o\nDLib/x.o\nDLib/autos.lib\nDLib/cs.lib\nDLib/ms.lib\n")
  220.         (safe)
  221.         )
  222.         (run
  223.         (lhext (arch_dest) (cat Disk2: "dice_linklibs.lha"))
  224.         )
  225.         (delete "ram:lhex.list" (safe))
  226.     )
  227.     (complete 30)
  228.  
  229.     (complete 34)
  230.  
  231.     (textfile
  232.         (dest "ram:lhex.list")
  233.         (append "Config/Default_Project.info\n")
  234.  
  235.         (safe)
  236.     )
  237.     (run
  238.         (lhext (dice_dest) (cat Disk2: "miscellaneous.lha"))
  239.     )
  240.     (delete "ram:lhex.list" (safe))
  241.     (complete 35)
  242.  
  243.     (working "Installing Common Include Files")
  244.     (run (lhopt (tackon arch_dest "Include/") (cat Disk2: "include_common.lha")))
  245.     (complete 40)
  246.  
  247.    )
  248.  
  249. ;***********************************************************************
  250. ;                   Install Disk 3
  251. ;***********************************************************************
  252. (debug "Install Disk3:")
  253. (complete 40)
  254.  
  255. (askdisk
  256.    (prompt "Please insert the disk labeled " Disk3 ".\n"
  257.        "(disk insertion is automatically detected)" )
  258.    (help   "The remaining DICE Libraries and Examples will be copied "
  259.        "from the Disk "  Disk3 " into your system.")
  260.    (dest Disk3)
  261. )
  262.  
  263.     (
  264.     (working "Installing Amiga Link Libraries")
  265.     (textfile
  266.         (dest "ram:lhex.list")
  267.         (append "DLib/amiga13s.lib\n")
  268.         (safe)
  269.     )
  270.     (run
  271.         (lhext (arch_dest) (cat Disk3: "amiga12_linklibs.lha"))
  272.     )
  273.     (delete "ram:lhex.list" (safe))
  274.  
  275.     (working "Installing Diff")
  276.     (textfile
  277.         (dest "ram:lhex.list")
  278.         (append "diff\n")
  279.         (safe)
  280.     )
  281.     (run
  282.         (lhext (tackon arch_dest "Bin/") (cat Disk3: "source_control.lha"))
  283.     )
  284.     (delete "ram:lhex.list" (safe))
  285.     )
  286.  
  287. ;***********************************************************************
  288. ;                   Install Disk 4
  289. ;***********************************************************************
  290. (debug "Install Disk4:")
  291. (complete 65)
  292.  
  293. (askdisk
  294.    (prompt "Please insert the disk labeled " Disk4 ".\n"
  295.        "(disk insertion is automatically detected)" )
  296.    (help   "The remaining Includes and Binaries will be copied "
  297.      "from the Disk "  Disk4 " into your system.")
  298.    (dest Disk4)
  299. )
  300.  
  301.    (
  302.  
  303.     (working "Installing debugger")
  304.     (textfile
  305.         (dest "ram:lhex.list")
  306.         (append "bin/dd\n")
  307.         (safe)
  308.     )
  309.     (run
  310.         (lhext (arch_dest) (cat Disk4: "debugger.lha"))
  311.     )
  312.     (delete "ram:lhex.list" (safe))
  313.     (complete 70)
  314.  
  315.     (run (lhopt (arch_dest) (cat Disk4: "miscellaneous.lha")))
  316.     (complete 79)
  317.  
  318.    )
  319.  
  320. ;***********************************************************************
  321. ;                   Install Disk 5
  322. ;***********************************************************************
  323. (debug "Install Disk5:")
  324. (complete 80)
  325.  
  326. (askdisk
  327.    (prompt "Please insert the disk labeled " Disk5 ".\n"
  328.        "(disk insertion is automatically detected)" )
  329.    (help   "The remaining Includes and Binaries will be copied "
  330.      "from the Disk "  Disk5 " into your system.")
  331.    (dest Disk5)
  332. )
  333.  
  334.     (working "Installing basic tools")
  335.     (run (lhopt (tackon arch_dest "Bin/") (cat Disk5: "basic_tools.lha")))
  336.     (complete 90)
  337.  
  338.     (working "Installing Dice-Startup Script")
  339.     (run (lhopt (dice_dest) (cat Disk5: "dice_startup.lha")))
  340.         (complete 92)
  341.  
  342.     (working "Installing Advanced Micro Emacs")
  343.     (run (lhopt (arch_dest) (cat Disk5: "ame_config.lha")))
  344.         (complete 95)
  345. ;***********************************************************************
  346. ;     Final Installation
  347. ;***********************************************************************
  348. (complete 98)
  349.  
  350.  
  351.  
  352.    ;***********************************************************************
  353.    ;        End game
  354.    ;***********************************************************************
  355. (debug "End game")
  356. (complete 100)
  357. (askbool
  358.    (prompt "In order for you to run DICE a script has been placed on the "
  359.        "floppy disk you just created called Dice-Startup. Anytime you "
  360.            "wish to use Dice simply invoke this script. Note you can add "
  361.            "the commands to your startup script if you so desire.\n\n"
  362.        "** IMPORTANT ** Please read the \"Release Notes\" file "
  363.        "for important information, including how to hook your "
  364.        "editor into the DICE system."
  365.    )
  366.    (help   "You you can add the commands from the Dice-Startup script to "
  367.        "your startup script. This installation does not do this "
  368.        "automatically so you do not have to have the Dice disk "
  369.        "in your floppy drive during system boots.")
  370.    (choices "Thank You" "")
  371.    (default 0)
  372. )
  373.  
  374. ;Cleanup
  375. ;
  376. (delete "ram:lhex" (safe))
  377. (delete "ram:lhex.list" (safe))
  378.  
  379. (exit)
  380.